<template>
    <div>
        <ul class="mui-table-view mui-table-view-chevron">
				<li class="mui-table-view-cell mui-media" v-for="item in product_list" :key="item.id">
					<router-link class="mui-navigate-right" :to="'/home/productinfo/'+item.id">
                        <img class="mui-media-object mui-pull-left" :src="item.imgurl">
						<div class="mui-media-body">
							{{item.name}}
							<p class="mui-ellipsis">烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
                            <p class="mui-ellipsis-price">￥：{{item.Price}}</p>
						</div>
					</router-link>
				</li>

			</ul>
    </div>
</template>
<script>
import axios  from 'axios'
    export default {
        components: {
        },
        data(){
            return{
                product_list:[]
            }
        },
        mounted (){
            axios.get('src/json/commodity.json', {} , {emulateJSON: true}).then((response) => {
                this.product_list = response.data.list;
                console.log(this.product_list);
            }).catch(function (error) {
                console.log(error);
            })
        }
    }
</script>
<style lang="less" scoped>
    .mui-table-view{
        .mui-media-object{
            line-height: inherit;
            max-width: 70px;
            height: auto;
        }
        .mui-ellipsis-price{
            color:red;
            font-size: 1.2rem;
        }
    }
</style>